﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Admin.Core.Service.sys.Permission.Dto/PermissionGetGroupDto 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       PermissionGetGroupDto
* 创建时间：  2025/6/4 11:13:37
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Admin.Core.Service.sys.Permission.Dto
{


    /// <summary>
    /// 权限菜单
    /// </summary>
    public class PermissionGetMenuDto : PermissionUpdateMenuDto
    {
    }

    /// <summary>
    /// 修改权限菜单
    /// </summary>
    public class PermissionUpdateMenuDto : PermissionAddMenuDto
    {
        /// <summary>
        /// 权限Id
        /// </summary>
        [Required]
        public long Id { get; set; }
    }

    /// <summary>
    /// 添加菜单
    /// </summary>
    public class PermissionAddMenuDto
    {
        /// <summary>
        /// 父级节点
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 视图
        /// </summary>
        public long? ViewId { get; set; }

        /// <summary>
        /// 路由命名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 隐藏
        /// </summary>
        public bool Hidden { get; set; } = false;

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 打开新窗口
        /// </summary>
        public bool NewWindow { get; set; } = false;

        /// <summary>
        /// 链接外显
        /// </summary>
        public bool External { get; set; } = false;

        /// <summary>
        /// 是否缓存
        /// </summary>
        public bool IsKeepAlive { get; set; } = true;

        /// <summary>
        /// 是否固定
        /// </summary>
        public bool IsAffix { get; set; } = false;

        /// <summary>
        /// 链接地址
        /// </summary>
        public string Link { get; set; }

        /// <summary>
        /// 是否内嵌窗口
        /// </summary>
        public bool IsIframe { get; set; } = false;

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }
    }
    /// <summary>
    /// 权限分组
    /// </summary>
    public class PermissionGetGroupDto : PermissionUpdateGroupDto
    {
    }
    /// <summary>
    /// 修改权限分组
    /// </summary>
    public class PermissionUpdateGroupDto : PermissionAddGroupDto
    {
        /// <summary>
        /// 权限Id
        /// </summary>
        [Required]
        public long Id { get; set; }
    }

    /// <summary>
    /// 条件分组
    /// </summary>
    public class PermissionAddGroupDto
    {
        /// <summary>
        /// 父级节点
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 视图
        /// </summary>
        public long? ViewId { get; set; }

        /// <summary>
        /// 路由命名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 访问路由地址
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 重定向地址
        /// </summary>
        public string Redirect { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string Label { get; set; }

        ///// <summary>
        ///// 说明
        ///// </summary>
        //public string Description { get; set; }

        /// <summary>
        /// 隐藏
        /// </summary>
        public bool Hidden { get; set; } = false;

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 展开
        /// </summary>
        public bool Opened { get; set; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }
    }


    /// <summary>
    /// 权限点
    /// </summary>
    public class PermissionGetDotDto : PermissionUpdateDotDto
    {
    }

    /// <summary>
    /// 修改权限点
    /// </summary>
    public class PermissionUpdateDotDto : PermissionAddDotDto
    {
        /// <summary>
        /// 权限Id
        /// </summary>
        [Required]
        public long Id { get; set; }
    }

    /// <summary>
    /// 添加权限点
    /// </summary>
    public class PermissionAddDotDto
    {
        /// <summary>
        /// 父级节点
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 关联接口
        /// </summary>
        public List<long> ApiIds { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 权限编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }
    }


    /// <summary>
    /// 添加接口
    /// </summary>
    public class PermissionAddApiDto
    {
        /// <summary>
        /// 父级节点
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 接口
        /// </summary>
        public long? ApiId { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// 权限编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 隐藏
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }
    }
}
